package com.ssy.lingxi.purchase.repository.purchaseplan;

import com.ssy.lingxi.purchase.entity.purchaseplan.PurchasePlanDetail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 采购计划明细DB操作类
 * */
@Repository
public interface PurchasePlanDetailRepository extends JpaRepository<PurchasePlanDetail, Long>, JpaSpecificationExecutor<PurchasePlanDetail> {

    Page<PurchasePlanDetail> findByPurchasePlanId(Long id, Pageable pageable);

    List<PurchasePlanDetail> findByPurchasePlanId(Long id);

    void deleteByPurchasePlanId(Long id);
}
